import 'package:flutter/material.dart';

/// 验收评估详情页主题配置
class YanshouTheme {
  // ==================== 颜色定义 ====================
  
  /// 主色渐变（红色）
  static const LinearGradient primaryGradient = LinearGradient(
    colors: [Color(0xFFFF6B6B), Color(0xFFD84545)],
  );
  
  /// 成功渐变（绿色）
  static const LinearGradient successGradient = LinearGradient(
    colors: [Color(0xFF66BB6A), Color(0xFF4CAF50)],
  );
  
  /// 信息渐变（蓝色）
  static const LinearGradient infoGradient = LinearGradient(
    colors: [Color(0xFF4FC3F7), Color(0xFF29B6F6)],
  );
  
  /// 警告色
  static const Color warningColor = Color(0xFFFF9800);
  
  /// 背景色
  static const Color backgroundColor = Color(0xFFF8F9FA);
  
  /// 卡片白色
  static const Color cardWhite = Color(0xFFFFFFFF);
  
  /// 文字主色
  static const Color textPrimary = Color(0xFF333333);
  
  /// 文字副色
  static const Color textSecondary = Color(0xFF666666);
  
  /// 文字辅助色
  static const Color textHint = Color(0xFF999999);
  
  /// 分割线颜色
  static const Color dividerColor = Color(0xFFE0E0E0);
  
  // ==================== 尺寸定义 ====================
  
  /// 圆角
  static const double radiusSm = 6.0;
  static const double radiusMd = 8.0;
  static const double radiusLg = 10.0;
  static const double radiusXl = 12.0;
  
  /// 间距
  static const double spacingXs = 2.0;
  static const double spacingSm = 4.0;
  static const double spacingMd = 6.0;
  static const double spacingLg = 8.0;
  static const double spacingXl = 10.0;
  static const double spacing2Xl = 12.0;
  
  /// 字号
  static const double textXs = 10.0;
  static const double textSm = 12.0;
  static const double textBase = 13.0;
  static const double textMd = 14.0;
  static const double textLg = 15.0;
  static const double textXl = 17.0;
  
  /// 图标尺寸
  static const double iconXs = 10.0;
  static const double iconSm = 14.0;
  static const double iconMd = 16.0;
  static const double iconLg = 20.0;
  
  // ==================== 阴影定义 ====================
  
  /// 卡片阴影（Level 1）
  static BoxShadow get cardShadow => BoxShadow(
        color: Colors.black.withOpacity(0.04),
        blurRadius: 6,
        offset: const Offset(0, 2),
      );
  
  /// 图片阴影（Level 2）
  static BoxShadow get imageShadow => BoxShadow(
        color: Colors.black.withOpacity(0.06),
        blurRadius: 8,
        offset: const Offset(0, 2),
      );
  
  /// 按钮渐变阴影（主色）
  static BoxShadow get primaryButtonShadow => BoxShadow(
        color: const Color(0xFFD84545).withOpacity(0.3),
        blurRadius: 8,
        offset: const Offset(0, 2),
      );
  
  /// 按钮渐变阴影（成功色）
  static BoxShadow get successButtonShadow => BoxShadow(
        color: const Color(0xFF4CAF50).withOpacity(0.3),
        blurRadius: 8,
        offset: const Offset(0, 2),
      );
  
  // ==================== 装饰器定义 ====================
  
  /// 标准卡片装饰
  static BoxDecoration get cardDecoration => BoxDecoration(
        color: cardWhite,
        borderRadius: BorderRadius.circular(radiusXl),
        boxShadow: [cardShadow],
      );
  
  /// 渐变按钮装饰（主色）
  static BoxDecoration get primaryButtonDecoration => BoxDecoration(
        gradient: primaryGradient,
        borderRadius: BorderRadius.circular(radiusXl),
        boxShadow: [primaryButtonShadow],
      );
  
  /// 渐变按钮装饰（成功色）
  static BoxDecoration get successButtonDecoration => BoxDecoration(
        gradient: successGradient,
        borderRadius: BorderRadius.circular(radiusXl),
        boxShadow: [successButtonShadow],
      );
  
  /// 渐变图标容器装饰
  static BoxDecoration get gradientIconDecoration => BoxDecoration(
        gradient: primaryGradient,
        borderRadius: BorderRadius.circular(radiusMd),
      );
  
  /// 渐变装饰线装饰
  static BoxDecoration get gradientLineDecoration => BoxDecoration(
        gradient: const LinearGradient(
          begin: Alignment.topCenter,
          end: Alignment.bottomCenter,
          colors: [Color(0xFFFF6B6B), Color(0xFFD84545)],
        ),
        borderRadius: BorderRadius.circular(2),
      );
  
  // ==================== 文字样式定义 ====================
  
  /// 标题样式
  static const TextStyle titleStyle = TextStyle(
    fontSize: textXl,
    fontWeight: FontWeight.bold,
    color: textPrimary,
    height: 1.2,
  );
  
  /// 次标题样式
  static const TextStyle subtitleStyle = TextStyle(
    fontSize: textMd,
    fontWeight: FontWeight.w600,
    color: textPrimary,
  );
  
  /// 正文样式
  static const TextStyle bodyStyle = TextStyle(
    fontSize: textBase,
    fontWeight: FontWeight.w500,
    color: textPrimary,
    height: 1.4,
  );
  
  /// 辅助文字样式
  static const TextStyle captionStyle = TextStyle(
    fontSize: textSm,
    fontWeight: FontWeight.w500,
    color: textHint,
  );
  
  /// 标签样式
  static TextStyle labelStyle = TextStyle(
    fontSize: textSm,
    color: Colors.grey[600],
    fontWeight: FontWeight.w500,
  );
  
  /// 值样式
  static const TextStyle valueStyle = TextStyle(
    fontSize: textBase,
    color: textPrimary,
    fontWeight: FontWeight.w600,
  );
}

